<!DOCTYPE html>
<html lang="en">
<head>
	<title>DataString.js :: Unit Tests :: ProtoLove</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<script type="text/javascript" src="../lib/qunit/qunit.js"></script>
	<script type="text/javascript" src="../src/DataString.js"></script>
	<link type="text/css" rel="stylesheet" href="css/screen.css" media="screen" />
</head>
<body>

<input type="text" name="cc" id="cc" value="4111111111111111" /><br />
<input type="text" name="bucks" id="bucks" value="123456.55" /><br />
<input type="text" name="bucks2" id="bucks2" value="bucks" /><br />
<div style="clear: both;"></div>

<div id="unit-output">
	<h1 id="qunit-header">ProtoLove Unit Tests - DataString.js</h1>
	<h2 id="qunit-banner"></h2>
	<h2 id="qunit-userAgent"></h2>
	<ol id="qunit-tests"><li></li></ol>
</div>

<script type="text/javascript">

var cc = new DataString.Cc;
cc.autoFormatInput('cc');

var dollars = new DataString.Dollars;
dollars.autoFormatInput('bucks');
dollars.keyMaskInput('bucks2')

/*
	with (QUnit) {

		test('construction', function() {
			var tpl;
			tpl = 'hello world';
			equal(new Template(tpl)+'', 'hello world', 'plain string');
		});

		test('{if}', function() {
			var tpl, values = {};
			tpl = "{if 1}hi{/if}";
			equal(new Template(tpl)+'', 'hi', 'if 1');

			tpl = "{if 0}hi{/if}";
			equal(new Template(tpl)+'', '', 'if 0');

			tpl = "{if $sally}hi sally!{/if}";
			values.sally = true;
			equal(new Template(tpl).evaluate(values), 'hi sally!', 'if $variable');
		});

		test('{foreach}', function() {
			var tpl, values;

			values = {colors:["red","blue","yellow"]};
			tpl = "{foreach $colors as $i => $color}{$i + 1}-{$color.toUpperCase()}, {/foreach}";
			equal(new Template(tpl).evaluate(values), "1-RED, 2-BLUE, 3-YELLOW, ", '{foreach $obj as $key => $value}');
			
		});

	}
*/
</script>

</body>
</html>